package JD_LOCK_SLEEP;

public class Example {
    String name;
    synchronized void finish(Object o) throws InterruptedException {
        while (!name.equals("root")) {
            Thread.sleep(1000);
        }
    }
}
